/*
 * Desain by Sugik Puja Kusuma, S.Kom
 * email   : sugik@do-event.com
 * website : http://www.sugik.do-event.com
 * ===============================================================
 *      Semua sorce dalam program ini dibawah license [GPL]
 *      Silakan Untuk mengembangkan dan memperbanyak source ini
 *      Dengan tidak menghilangkan nama pembuat
 * ===============================================================
 */
package mbahsomo.doevent.widget;

import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.CTabFolder;
import org.eclipse.swt.custom.CTabFolderAdapter;
import org.eclipse.swt.custom.CTabFolderEvent;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;

public class TabClose extends CTabFolder{
	public TabClose(Composite parent, int style) {
		super(parent, style);
		settingAwal();
	}

	@SuppressWarnings("deprecation")
	private void settingAwal(){
		Display display = Display.getDefault();
		this.setBorderVisible(true);
		this.setSelectionBackground(
				new Color[] {
			        display.getSystemColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW),
			        display.getSystemColor(SWT.COLOR_WIDGET_NORMAL_SHADOW),
			        display.getSystemColor(SWT.COLOR_WIDGET_LIGHT_SHADOW)
		        }, new int[] { 
						50,100
				}
		);
		this.addCTabFolderListener(new CTabFolderAdapter() {
	      public void itemClosed(final CTabFolderEvent event) {}
	    });
	}
	
}
